<h3>Manage users</h3>
<?php $this->widget('FGridView', array(
    'id'=>'user-grid',
    'bulkOptions'=>array(
        'actions' => array('delete' => array('Delete', $this->createUrl('bulk'))),
    ),
    'dataProvider'=>$model->search(),
    'filter'=>$model,
    'columns'=>array(
        array(
            'class'=>'CCheckBoxColumn',
            'name'=>'Id',
            'value'=>'$data->Id',
        ),
        array(
            'class'=>'FDataColumn',
            'header'=>'Fullname',
            'name'=>'FirstName',
            'type'=>'raw',
            'value'=>"CHtml::link(\$data->FirstName.' '.\$data->LastName, Yii::app()->controller->createUrl('Edit', array('Id'=>\$data->Id)))",
            'htmlOptions'=>array('class'=>'alignLeft'),
            'rowActions'=>array(
				                'template'=>'{reactivate} | {profile} | {edit} | {delete}',
				                'buttons'=>array(
				                		'reactivate' => array(
				                			'label' => 'Resend activation email',
				                			'url' => 'Yii::app()->controller->createUrl("resendActivation", array("Id"=>$data->Id))',
				                		),
				                		'profile' => array(
				                			'label' => 'Profile',
				                			'url' => 'Yii::app()->controller->createUrl("viewProfile", array("UserId"=>$data->Id))',
				                		),
					                    'edit'=>array(
					                        'label'=>'Edit',
					                        'url'=>'Yii::app()->controller->createUrl("edit", array("Id"=>$data->Id))',
					                    ),
					                    'delete'=>array(
					                        'label'=>'Delete',
					                        'url'=>'Yii::app()->controller->createUrl("bulk", array("Id"=>$data->Id, "action" => "delete"))',
					                    ),
					                )
				            ),
        ),
        'Username',
        array(
            'name'=>'Email',
            'type'=>'email',
            'value'=>'$data->Email',
        ),
        array(
            'name'=>'Status',
            'value'=>'$data->StatusCollection[$data->Status]',
            'filter' => $model->StatusCollection,
        ),
        array(
            'filter' => false,
            'type'=>'raw',
            'header' => 'Roles',
            'name'=>'Id',
            'value'=>'implode(",",$data->Roles)',
        ),
    )
));?>